import request from '../utils/request';
import Qs from 'qs';

export function getMaintenanceData(params) {
  return request({
    url: '/heatSystem/listGroupByMaintenance',
    method: 'post',
    params,
  });
}

/**
 *
 * @param {查询实时数据} params
 * @returns
 */
export function getRunData(params) {
  return request({
    url: '/realdata/listStandardizedDisplay',
    method: 'post',
    params,
    headers: { showLoading: true },
  });
}

/**
 *
 * @param {查询实时数据---新} params
 * @returns
 */
export function getRunDataNew(params) {
  return request({
    url: '/realdata/realDataByHeatSytemIds',
    method: 'post',
    params,
    paramsSerializer: params => {
      return Qs.stringify(params, { indices: false });
    },
  });
}

/**
 *
 * @param {查询表头} params
 * @returns
 */
export function getHeads(params) {
  return request({
    url: '/realdata/getByHeader',
    method: 'post',
    params,
  });
}
